package tools.emboss;

public class embossAlignment {

	private String qname,tname,matrix;
	private String sep="\t";
	private double gap_penalty,gap_extension_penalty,score;
	private int alignment_length,identity,similarity,gaps;
	
	public embossAlignment(){
		
	}
	public embossAlignment(embossAlignment ea){
		this.qname=ea.qname;
		this.tname=ea.tname;
		this.matrix=ea.matrix;
		this.gap_penalty=ea.gap_penalty;
		this.gap_extension_penalty=ea.gap_extension_penalty;
		this.score=ea.score;
		this.alignment_length=ea.alignment_length;
		this.identity=ea.identity;
		this.similarity=ea.similarity;
		this.gaps=ea.gaps;
	}
	
	public String toString(){
		return qname+sep+tname+sep+matrix+sep+gap_penalty+sep+gap_extension_penalty+sep+alignment_length+sep+identity+sep+similarity+sep+gaps+sep+score;
	}
	
	public String toStringRev(){
		return tname+sep+qname+sep+matrix+sep+gap_penalty+sep+gap_extension_penalty+sep+alignment_length+sep+identity+sep+similarity+sep+gaps+sep+score;
	}
	
	public double Identity(){
		return (double)identity/(double)alignment_length;
	}
	
	public embossAlignment rev(){
		embossAlignment ea= new embossAlignment(this);
		ea.qname=this.tname;
		ea.tname=this.qname;
		return ea;
	}
	
	public int getAlignment_length() {
		return alignment_length;
	}
	public void setAlignment_length(int alignment_length) {
		this.alignment_length = alignment_length;
	}
	public double getGap_extension_penalty() {
		return gap_extension_penalty;
	}
	public void setGap_extension_penalty(double gap_extension_penalty) {
		this.gap_extension_penalty = gap_extension_penalty;
	}
	public double getGap_penalty() {
		return gap_penalty;
	}
	public void setGap_penalty(double gap_penalty) {
		this.gap_penalty = gap_penalty;
	}
	public int getGaps() {
		return gaps;
	}
	public void setGaps(int gaps) {
		this.gaps = gaps;
	}
	public int getIdentity() {
		return identity;
	}
	public void setIdentity(int identity) {
		this.identity = identity;
	}
	public String getMatrix() {
		return matrix;
	}
	public void setMatrix(String matrix) {
		this.matrix = matrix;
	}
	public String getQname() {
		return qname;
	}
	public void setQname(String qname) {
		this.qname = qname;
	}
	public double getScore() {
		return score;
	}
	public void setScore(double score) {
		this.score = score;
	}
	public int getSimilarity() {
		return similarity;
	}
	public void setSimilarity(int similarity) {
		this.similarity = similarity;
	}
	public String getTname() {
		return tname;
	}
	public void setTname(String tname) {
		this.tname = tname;
	}
	
	
}
